import sys
sys.path.append("..")

if __name__ == '__main__':
    if len(sys.argv) == 2:
      print '\Gorb Tester 1.0'
      print '-----------------------------\n'
      import doctest, unittest
      
      test_suite_type =  sys.argv[1]
  
      if test_suite_type == 'unit':
          print '** Running file tests - orb_unit_test.txt'
          suite = doctest.DocFileSuite('unit_test.txt', optionflags=doctest.ELLIPSIS)
          unittest.TextTestRunner().run(suite)
  
      if test_suite_type == 'system':
          print '** Running system tests - orb_system_test.txt'
          suite = doctest.DocFileSuite('system_test.txt', optionflags=doctest.ELLIPSIS)
          unittest.TextTestRunner().run(suite)
    else:
      print """
  Gorb Tester 1.0
       
  Usage: 
    When run as a script, testing options are available:
    $ python runtests.py [unit | system]
  """
